home *** CD-ROM | disk | FTP | other *** search
/ Graphics & Sound Program…ng Techniques for the Mac / Graphics and Sound Programming Techniques for the Mac.iso / M&T Graphics & Sound Examples / Symantec Versions / C09 App-QuickTime / P01 Film Edit / EditMenu.c < prev    next >
Encoding:
Text File  |  1995-08-31  |  3.1 KB  |  129 lines  |  [TEXT/KAHL]

  1. //____________________________________________________________
  2. //    EditMenu.c
  3. //
  4. //    Copyright © Dan Parks Sydow, 1995
  5. //    From the book:
  6. //    "Graphics and Sound Programming Techniques for the Mac",
  7. //    M&T Books, 1995
  8.  
  9.  
  10. //____________________________________________________________
  11.  
  12. #include <Movies.h>
  13.  
  14. #include "Defines.h" 
  15. #include "DataTypes.h"
  16. #include "Globals.h"
  17. #include "WindRecordAccess.h"
  18. #include "EditMenu.h"
  19.  
  20.  
  21. //____________________________________________________________
  22.  
  23. void  HandleEditMenuUndoItem( void )
  24. {
  25.    WindowPtr        theWindow;
  26.    MovieController  theController;
  27.  
  28.    theWindow = FrontWindow();
  29.    theController = GetWindowController( theWindow );
  30.    
  31.    MCUndo( theController );
  32. }
  33.  
  34.  
  35. //____________________________________________________________
  36.  
  37. void  HandleEditMenuCutItem( void )
  38. {
  39.    WindowPtr        theWindow;
  40.    MovieController  theController;
  41.    Movie            theTempMovie;
  42.  
  43.    theWindow = FrontWindow();
  44.    theController = GetWindowController( theWindow );
  45.    
  46.    theTempMovie = MCCut( theController );
  47.    PutMovieOnScrap( theTempMovie, movieScrapOnlyPutMovie );
  48.    DisposeMovie( theTempMovie );    
  49. }
  50.  
  51.  
  52. //____________________________________________________________
  53.  
  54. void  HandleEditMenuCopyItem( void )
  55. {
  56.    WindowPtr        theWindow;
  57.    MovieController  theController;
  58.    Movie            theTempMovie;
  59.  
  60.    theWindow = FrontWindow();
  61.    theController = GetWindowController( theWindow );
  62.    
  63.    theTempMovie = MCCopy( theController );
  64.    PutMovieOnScrap( theTempMovie, movieScrapOnlyPutMovie );
  65.    DisposeMovie( theTempMovie );    
  66. }
  67.  
  68.  
  69. //____________________________________________________________
  70.  
  71. void  HandleEditMenuPasteItem( void )
  72. {
  73.    WindowPtr        theWindow;
  74.    MovieController  theController;
  75.  
  76.    theWindow = FrontWindow();
  77.    theController = GetWindowController( theWindow );
  78.    
  79.    MCPaste( theController, nil );
  80. }
  81.  
  82.  
  83. //____________________________________________________________
  84.  
  85. void  HandleEditMenuClearItem( void )
  86. {
  87.    WindowPtr        theWindow;
  88.    MovieController  theController;
  89.  
  90.    theWindow = FrontWindow();
  91.    theController = GetWindowController( theWindow );
  92.    
  93.    MCClear( theController );
  94. }
  95.  
  96.  
  97. /**************************************************************
  98. //____________________________________________________________
  99.  
  100. void  HandleEditMenuSelectAllItem( void )
  101. {
  102.    WindowPtr        theWindow;
  103.    MovieController  theController;
  104.    TimeRecord       theTimeRecord;
  105.    Movie            theMovie;
  106.  
  107.    theWindow = FrontWindow();
  108.    theController = GetWindowController( theWindow );   
  109.    theMovie = GetWindowMovie( theWindow );
  110.            
  111.    theTimeRecord.value.hi = 0; 
  112.    theTimeRecord.value.lo = 0;
  113.    theTimeRecord.base = 0;
  114.     
  115.    theTimeRecord.scale = GetMovieTimeScale( theMovie );    
  116.    MCDoAction( theController, mcActionSetSelectionBegin, &theTimeRecord);
  117.     
  118.    theTimeRecord.value.lo = GetMovieDuration( theMovie );    
  119.    MCDoAction( theController, mcActionSetSelectionDuration, &theTimeRecord );
  120. }
  121. **************************************************************/
  122.  
  123. //____________________________________________________________
  124.  
  125. void  HandleEditMenuSelectAllItem( void )
  126. {
  127.    ;
  128. }
  129.